<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="stylesheet" href="./css/tags.css">
    <script src="./node_modules/layui/dist/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <!--[if lt IE 9]>
           <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
</head>

<body>
    <div class="layui-tab  " lay-filter="docDemoTabBrief" style=" background-color: #fff">
        <ul class="layui-tab-title">

            <li class="layui-this"> <b>标签列表</b></li>
            <li><strong>添加标签</strong></li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <table class="layui-table " lay-size="lg" lay-skin="line">
                    <colgroup>
                        <col width="5%">
                        <col width="35%">
                        <col width="35%">
                        <col width="20%">
                    </colgroup>
                    <thead>
                        <tr>
                            <th>编号</th>
                            <th>ID</th>
                            <th>名称</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>

                    </tbody>
                    <!-- 第一页 -->

                </table>
                <!-- 定义分页容器 -->
                <div id="pageBox"></div>
            </div>
            <!-- 添加标签 2-->
            <div class="layui-tab-item add">
                <form class="layui-form form-add">
                    <div class="layui-form-item">
                        <h3 class="cate_name">标签名称:</h3>
                        <div class="layui-input-block">
                            <input type="text" id="input-add" placeholder="请输入标签名" name="catename" required lay-verify="required" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item ">
                        <div class="layui-input-block">
                            <button class="layui-btn   layui-btn-danger  layui-btn-lg" lay-submit lay-filter="formDemo">立即创建</button>
                            <button type="reset" class="layui-btn layui-btn-primary  layui-btn-lg ">取消</button>

                        </div>
                    </div>
                </form>

            </div>


        </div>
    </div>
    <!-- 表格数据的模板 -->
    <script type="text/html" id="tag_table">
        {{each data}}
        <tr>
            <td>{{++$index}}</td>
            <td>{{$value.id}}</td>
            <td>{{$value.tagname}}</td>
            <td>
                <i class="layui-icon layui-icon-edit tag_edit" data-id="{{$value.id}}" data-catename="{{$value.tagname}}"></i>

                <i class="layui-icon  cate-delete layui-icon-delete" data-id1="{{$value.id}}" style="background-color: red;"></i>
            </td>
        </tr>
        {{/each}}
    </script>
    <!-- 修改标签的弹出层 -->
    <script type="text/html" id="tpl_tag">
        <form class="layui-form tag-edit">
            <div class="layui-form-item">
                <h3 class="cate_name">标签名称</h3>
                <div class="layui-input-block">
                    <input type="text" id="input-edit" placeholder="" name="catename" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn layui-btn-danger  layui-btn-lg" lay-submit lay-filter="formDemo">确定</button>
                    <button type="reset" class="layui-btn layui-btn-primary  layui-btn-lg " onclick="layer.closeAll()">取消</button>
                </div>
            </div>
        </form>
    </script>



    <script src="./js/jquery.min.js"></script>
    <!-- <script src="./js/baseAPI.js"></script> -->
    <!-- 导入模板JS文件 -->
    <script src="./js/template-web.js"></script>

    <!-- 导入自己的JS文件 -->
    <script src="./js/tags.js"></script>
</body>


</html>